import 'package:flutter/cupertino.dart';
import 'package:myturngame/bean/bagobject/bag_object.dart';

import '../Theme.dart';

class Message {
  List<TextSpan> textSpans = [];

  Message(this.textSpans);

  Message.text(String text){
    textSpans = [TextSpan(text: text, style: textStyle3)];
  }

  Message.object(BagObject object){
    textSpans = [
      const TextSpan(text: "获得 ", style: textStyle3),
      TextSpan(text: object.name,
          style: TextStyle(fontSize: 14,
              color: object.color,
              decoration: TextDecoration.none))
    ];
  }
}